-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add process profiler for debugging #6171
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this and will find this very valuable for helping debug with users.
Can you open a PR within cypress-documentation in debugging page to describe how to print this and update the intervals? https://docs.cypress.io/guides/guides/debugging.html#Troubleshooting-Cypress
Mine printed towards the beginning of launch by default and was already at max CPU from Cypress. Assuming this is printing as expected? This was running in --dev
though.
Yeah, it will print once when it starts and then at an interval after that, so that's expected. Cypress probably uses a ton of CPU when first starting up. Opened a PR in docs: cypress-io/cypress-documentation#2407 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on pairing we've determined to intelligently group the various processes based on their user-related usage...
Browser Rules:
- start from the parent cypress process
- walk down to children
- if children matches the launched browser's pid
- consider that the top level process for calculating children
Cypress:
- parent process
- Cypress Helper (unknown extra one --type=utility)
Plugins File:
- Cypress Helper (plugins child process --file XXX)
Desktop GUI: (won't be present in cypress run mode)
- Cypress Renderer (desktop gui)
Electron:
- Cypress Renderer (AUT)
- Cypress GPU (will still be present in cypress run mode)
Firefox:
- XXX
Chrome:
- XXX
ffmpeg
- XXX
Other:
- every other process that's been spawned from the parent Cypress PID but is unknown
…enabled or verbosedebug is enabled
7d40584
to
a13bd36
Compare
User facing changelog
cypress:server:util:process_profiler
debug stream.Additional details
looks like this (processes are grouped based on heuristics):
users can also choose to dump out ALL process information at every interval by using
cypress-verbose:server:util:process_profiler
, but this would be a looooot of datausers can also set
CYPRESS_PROCESS_PROFILER_INTERVAL
to the number of milliseconds between invocationsHow has the user experience changed?
see above
PR Tasks
cypress-documentation
? Document process profiler cypress-documentation#2407